<template>
  <div>{{ student.name }} 已经 {{ student.age }}岁了</div>
  <button @click="student.age++">过了一年</button>
</template>
<script>
import { reactive } from 'vue'
export default {
  setup() {

    // 传入普通对象, 返回一个处理过的响应式对象
    const student = reactive({
      name: 'tom',
      age: 17
    })

    return {
      student
    }
  }
};
</script>